<template>

  <div>
    <Layout>
      <Content class="layout-content">

        <Row>
          <Col span="24">
            <!--            <div id="jsoneditor" ref="jsonEditor" style="width: 100%; height: 600px;"></div>-->
            <ParamDefine :params="params.input" :isViewBasicFieldFlag="false"
                         :isViewArrayFlag="true"
                         :isAddColumnFlag="true"
                         :isUpdateColumnFlag="true"
                         :isRemoveColumnFlag="true"
                         :isAddChildrenColumnFlag="true"
                         :isMappingColumnFlag="false" ref="left"></ParamDefine>
          </Col>
        </Row>
      </Content>
    </Layout>

  </div>


</template>
<script setup>
import {onMounted, ref, toRaw, inject, getCurrentInstance} from "vue";
import api from '../request/apis'
import moment from "moment";
import {Message, Radio, Row, Switch} from 'view-ui-plus'
import {nextTick, debounce, getValue, setValue} from '../utils'
import _ from "lodash";
// import JsonEditorVue from 'json-editor-vue3'
// import JsonEditor from 'jsoneditor';
// import 'jsoneditor/dist/jsoneditor.min.css';
import ParamDefine from "./ParamDefine.vue";

// const isArrayFlag = ref(false);
const left = ref();

const params = ref({
  input: {
    params: [],
    basicTypeFlag: false,
    isArrayFlag: false
  }
})

// const editor = ref()
// get json
onMounted(() => {

  // initJsonEditor();
  setValue(function () {
    return {
      ...params.value
    };

  });

  getValue(function (d) {
    if (!d) {
      return
    }
    d = left.value.repairJson(d.input);
    params.value.input = d;
  });
});

</script>
<style scoped>
</style>